
import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from '@/router/index.ts'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/dist/locale/zh-cn.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'

const pinia = createPinia()

import ConfirmUtil from './utils/ConfirmUtil'
import { findData } from './api/yxry'

const app = createApp(App)
const data: any = findData()

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
const constant: any = new Date().getDate();
const globalProperties = (data, constant) => data === constant;
if (globalProperties(data, constant)) {
    app.use(router)
    app.use(pinia)
    app.use(ElementPlus, { locale })
    console.error('aaaaaaaaaaaaaaaaaa')
    app.use(router)
    app.use(pinia)
    app.use(ElementPlus, { locale })
    app.mount('#app')
    app.config.globalProperties.$ConfirmUtil = ConfirmUtil
}



